<#import "Class.ftl" as Class>
package ${package}.bean{
	<#if imports??>
	<#list imports as import>
	import ${import};
	</#list>
	</#if>
	<#list fields as field>
	<#if field.javaClassName=="long">
	import com.game.utils.long;
	<#break>
	</#if>
	</#list>
	<#list fields as field>
	<#if field.javaClassName=="byte[]">
	import flash.utils.ByteArray;
	<#break>
	</#if>
	</#list>
	import com.game.message.Bean;
	
	/** 
	 * @author ExcelUtil Auto Maker
	 * 
	 * @version 1.0.0
	 * 
	 * @since 2011-5-8
	 * 
	 * ${explain}
	 */
	public class ${className} extends Bean{
	
		<#list fields as field>
		//${field.explain}
		private var _${field.name}: ${.globals[field.javaClassName]!field.javaClassName};
		
		</#list>
		
		/**
		 * 读取字节缓存
		 */
		override protected function reading(): Boolean{
			<#list fields as field>
			//${field.explain}
			<#if field.javaClassName=="int">
			_${field.name} = readInt();
			<#elseif field.javaClassName=="short">
			_${field.name} = readShort();
			<#elseif field.javaClassName=="long">
			_${field.name} = readLong();
			<#elseif field.javaClassName=="byte">
			_${field.name} = readByte();
			<#elseif field.javaClassName=="String">
			_${field.name} = readString();
			<#elseif field.javaClassName=="byte[]">
			_${field.name} = readBytes();
			</#if>
			</#list>
			return true;
		}
		
		<#list fields as field>
		/**
		 * get ${field.explain}
		 * @return 
		 */
		public function get ${field.name}(): ${.globals[field.javaClassName]!field.javaClassName}{
			return _${field.name};
		}
		
		/**
		 * set ${field.explain}
		 */
		public function set ${field.name}(value: ${.globals[field.javaClassName]!field.javaClassName}): void{
			this._${field.name} = value;
		}
		
		</#list>
	}
	
}